package learningThread.api.sleepApi;

/**
 *
 */
public class TestThread {

    public static void main(String[] args) {
        //继承Thread
        MyThread myThread = new MyThread();
        myThread.setName("my");
        MyThread runThread = new MyThread();
        //调用start 方法
        myThread.start();

        //获取线程ID
        //System.out.println(myThread.getId());
       //调用run 方法,这个是 main线程直接运行函数，而非新线程对象执行
        runThread.run();

    }
}
